<template>
    <div class="box">
        <!-- 头部 -->
        <div class="header_box">
            <van-icon class="icon" name="arrow-left" @click="back" />
            <span>申请记录</span>
            <router-link to="/SetShopHelp">
                <span class="why">开店帮助</span>
            </router-link>
        </div>
        <div class="content">
            <van-tabs @click="onClick">
                <!-- 全部 -->
                <van-tab title="全部">
                    <div>
                        <div class="con_box">
                            <van-icon name="shop-collect-o" />
                            <div class="con">
                                <div class="title_box">
                                    <span>{{dataList.shopInformation.chShopName}}</span>
                                    <router-link to="/ApplicationDetails">
                                        <span>详情
                                            <van-icon name="arrow"/>
                                        </span>
                                    </router-link>
                                </div>
                                <span class="tel">{{dataList.shopInformation.phoneNumber}}</span>
                                <div class="information_box">
                                    <div class="information_s">
                                        <span>审核状态</span>
                                        <span class="state">未处理</span>
                                    </div>
                                    <div class="information_s">
                                        <span>店铺类型</span>
                                        <span>{{dataList.shopKind}}</span>
                                    </div>
                                    <div class="information_s">
                                        <span>经营品类</span>
                                        <span>主：{{main}}/辅：{{au}}</span>
                                    </div>
                                    <div class="information_s">
                                        <span>申请时间</span>
                                        <span>{{time}}</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div class="con_box">
                            <van-icon name="shop-collect-o" />
                            <div class="con">
                                <div class="title_box">
                                    <span>默林如斯的广东肠粉早餐店（凤凰广场店)</span>
                                    <router-link to="/ApplicationDetails">
                                        <span>详情
                                            <van-icon name="arrow" />
                                        </span>
                                    </router-link>
                                </div>
                                <span class="tel">+ 8618328905521</span>
                                <div class="information_box">
                                    <div class="information_s">
                                        <span>审核状态</span>
                                        <span class="state">待签订合同</span>
                                    </div>
                                    <div class="information_s">
                                        <span>店铺类型</span>
                                        <span>餐饮店铺</span>
                                    </div>
                                    <div class="information_s">
                                        <span>经营品类</span>
                                        <span>主：肠粉/辅茶饮</span>
                                    </div>
                                    <div class="information_s">
                                        <span>申请时间</span>
                                        <span>2021-09-07 14:58:35</span>
                                    </div>
                                    <router-link to="/SignContract">
                                        <van-button color="#ff6e53" plain class="contract_btn">签订合同</van-button>
                                    </router-link>
                                </div>
                            </div>
                        </div>
                    </div>
                </van-tab>
                <!-- 未处理 -->
                <van-tab title="未处理">
                    <div>
                        <div class="con_box">
                            <van-icon name="shop-collect-o" />
                            <div class="con">
                                <div class="title_box">
                                    <span>默林如斯的广东肠粉早餐店（凤凰广场店)</span>
                                    <router-link to="/ApplicationDetails">
                                        <span>详情
                                            <van-icon name="arrow" />
                                        </span>
                                    </router-link>
                                </div>
                                <span class="tel">+ 8618328905521</span>
                                <div class="information_box">
                                    <div class="information_s">
                                        <span>审核状态</span>
                                        <span class="state">未处理</span>
                                    </div>
                                    <div class="information_s">
                                        <span>店铺类型</span>
                                        <span>餐饮店铺</span>
                                    </div>
                                    <div class="information_s">
                                        <span>经营品类</span>
                                        <span>主：肠粉辅茶饮</span>
                                    </div>
                                    <div class="information_s">
                                        <span>申请时间</span>
                                        <span>2021-09-07 14:58:35</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </van-tab>
                <!-- 审核中 -->
                <van-tab title="审核中">
                    <div>
                        <div class="con_box">
                            <van-icon name="shop-collect-o" />
                            <div class="con">
                                <div class="title_box">
                                    <span>默林如斯的广东肠粉早餐店（凤凰广场店)</span>
                                    <router-link to="/ApplicationDetails">
                                        <span>详情
                                            <van-icon name="arrow" />
                                        </span>
                                    </router-link>
                                </div>
                                <span class="tel">+ 8618328905521</span>
                                <div class="information_box">
                                    <div class="information_s">
                                        <span>审核状态</span>
                                        <span class="state">审核中</span>
                                    </div>
                                    <div class="information_s">
                                        <span>店铺类型</span>
                                        <span>餐饮店铺</span>
                                    </div>
                                    <div class="information_s">
                                        <span>经营品类</span>
                                        <span>主：肠粉/辅茶饮</span>
                                    </div>
                                    <div class="information_s">
                                        <span>申请时间</span>
                                        <span>2021-09-07 14:58:35</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </van-tab>
                <!-- 已完结 -->
                <van-tab title="已完结">
                    <div>
                        <div class="con_box">
                            <van-icon name="shop-collect-o" />
                            <div class="con">
                                <div class="title_box">
                                    <span>默林如斯的广东肠粉早餐店（凤凰广场店)</span>
                                    <router-link to="/ApplicationDetails">
                                        <span>详情
                                            <van-icon name="arrow" />
                                        </span>
                                    </router-link>
                                </div>
                                <span class="tel">+ 8618328905521</span>
                                <div class="information_box">
                                    <div class="information_s">
                                        <span>审核状态</span>
                                        <span class="state">已完结</span>
                                    </div>
                                    <div class="information_s">
                                        <span>店铺类型</span>
                                        <span>餐饮店铺</span>
                                    </div>
                                    <div class="information_s">
                                        <span>经营品类</span>
                                        <span>主：肠粉/辅茶饮</span>
                                    </div>
                                    <div class="information_s">
                                        <span>申请时间</span>
                                        <span>2021-09-07 14:58:35</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </van-tab>
            </van-tabs>
        </div>
        <div class="btn_box">
            <router-link to="/ProcessReminder">
                <van-button round class="btn_next">新建店铺</van-button>
            </router-link>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            dataList:"",
            time:"", // 开店申请时间
            main:"", // 主营商品
            au:"", // 辅营商品 
        }
    },
    methods: {
        back() {
            this.$router.go(-1)
        },
        onClick(name, title) {
            console.log(title);
        },
    },
    created(){
        this.dataList = this.$store.state.shop.data
        this.time = this.$store.state.shop.time

        // 主营商品
        this.main = this.dataList.shopInformation.main.split(':')[1]
        // 辅营商品
        this.au = this.dataList.shopInformation.au.split(':')[1]
    }
}
</script>

<style scoped>
.box {
    background-color: #f6f3f3;
    height: 667px;
}

.header_box {
    position: fixed;
    top: 0;
    z-index: 99;
    width: 100%;
    background-color: rgba(255, 110, 83, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    font-size: 17px;
    color: aliceblue;
}

.icon {
    width: 16%;
    padding-left: 20px;
}

.why {
    padding-right: 20px;
    font-size: 13px;
    color: #e9e2e2;
}

/* 内容 */
.content {
    padding-top: 12%;
    width: 100%;
}

.van-tab__pane {
    width: 90%;
    margin: 0 auto;
    font-size: 14px;
}
.van-tab__pane>div{
    width: 100%;
}

.con_box {
    width: 100%;
    background-color: #ffff;
    border-radius: 10px;
    display: flex;
    margin: 15px 0;
}

.con_box i {
    font-size: 30px;
    padding: 6px;
    color: #777676;
}
.con{
    width: 100%;
}
.title_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.title_box span{
    color: #350575;
}
.title_box :last-child {
    width: 30%;
    line-height: 43px;
    text-align: center;
    /* background-color: pink; */
}

.title_box i {
    padding: 0;
    font-size: 13px;
}

.tel {
    width: 90%;
    color: #abaaaa;
    display: inline-block;
    padding: 6px 0;
    border-bottom: 1px solid #e7e4e4;
}

.information_box {
    margin: 10px 0;
}

.information_s {
    width: 90%;
    display: flex;
    justify-content: space-between;
}

.information_s :first-child {
    color: #abaaaa;
}

.state {
    color: #ff6e53;
}

/* 新建店铺按钮 */
.btn_box {
    width: 80%;
    left: 50%;
    transform: translateX(-50%);
    position: fixed;
    bottom: 0;
    z-index: 99;
}

.btn_next {
    width: 100%;
    background-color: #ff6e53;
    text-align: center;
    color: #ffff;
    font-size: 16px;
    margin: 12px 0;
}

/* 签订合同的按钮 */
.contract_btn{
    font-size: 14px;
    height: 30px;
    margin-left: 60%;
}
</style>